#ifndef LIST_TYPE
#define LIST_TYPE int
#endif

typedef struct LinkedList
{
	LIST_TYPE value;
	struct LinkedList* next;
	struct LinkedList* prev;
}LinkedList;

LinkedList* newList();
LIST_TYPE peekList(LinkedList* _list);
LIST_TYPE getFirst(LinkedList* _list);
void addElement(LinkedList* _list, LIST_TYPE value);
void appendToBegin(LinkedList* _list, LIST_TYPE value);
int listLength(LinkedList* _list);
LIST_TYPE getElement(LinkedList* _list, int pos);
void removeElement(LinkedList* _list, int pos);
void removeList(LinkedList* _list);
LIST_TYPE* listToArray(LinkedList* _list);
void insertElement(LinkedList* _list, int pos, LIST_TYPE value);
LinkedList* arrayToList(LIST_TYPE* arr, int length);
void appendList(LinkedList* _list, LIST_TYPE* arr, int length);
LinkedList* listSlice(LinkedList* _list, int start, int end);
LinkedList* copyList(LinkedList* _list);
void listCat(LinkedList* dst, LinkedList* src);